Migrate deprecated gopkg.in/yaml.v3 to go.yaml.in/yaml/v3#3865
Conversation
|
Hi @chimanjain. Thanks for your PR. I'm waiting for a operator-framework member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
There was a problem hiding this comment.
Pull request overview
This PR updates Operator Lifecycle Manager (OLM) to use the newer go.yaml.in/yaml/v3 module path in place of the deprecated gopkg.in/yaml.v3, aligning local code with the YAML project’s domain migration.
Changes:
- Updated YAML v3 imports from
gopkg.in/yaml.v3togo.yaml.in/yaml/v3in the cpb utility and a catalog operator test. - Updated
go.modto addgo.yaml.in/yaml/v3 v3.0.4as a direct dependency and drop the directgopkg.in/yaml.v3requirement (though it remains indirect).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| util/cpb/main.go | Switches YAML v3 import to the new go.yaml.in module path for bundle annotation parsing. |
| pkg/controller/operators/catalog/operator_test.go | Switches YAML v3 import to go.yaml.in and includes gofmt formatting-only adjustments in tests. |
| go.mod | Adds go.yaml.in/yaml/v3 as a direct requirement and adjusts YAML v3 dependency entries. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| gopkg.in/warnings.v0 v0.1.2 // indirect | ||
| gopkg.in/yaml.v2 v2.4.0 // indirect | ||
| gopkg.in/yaml.v3 v3.0.1 // indirect | ||
| k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b // indirect |
There was a problem hiding this comment.
It is an indirect dependency which will be removedonce the direct dependencies migrate to the maintained yaml gomodule
Signed-off-by: Chiman Jain <chimanjain15@gmail.com>
3dd6dda to
10c397a
Compare
Signed-off-by: Chiman Jain <chimanjain15@gmail.com>
| gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect | ||
| gopkg.in/warnings.v0 v0.1.2 // indirect | ||
| gopkg.in/yaml.v2 v2.4.0 // indirect | ||
| gopkg.in/yaml.v3 v3.0.1 // indirect |
There was a problem hiding this comment.
Reran go mod tidy and then go mod vendor. The vendoring is consitent.
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rashmigottipati, tmshort The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
b0123be
into
operator-framework:master
Description of the change:
Migrate deprecated
gopkg.in/yaml.v3togo.yaml.in/yaml/v3from direct dependenies.Reference: https://github.com/yaml/go-yaml
Motivation for the change:
The gopkg.in domain is deprecated and the yaml project has moved to go.yaml.in.
This ensures continued updates and security patches.
Testing remarks:
Reviewer Checklist
/doc[FLAKE]are truly flaky and have an issue